public class Dog {
	private String name;
	private int age;
	
	public Dog() {
	}

	public Dog(String name, int age) {
		this.name = name;
		this.age = age;
	}

	public String getName() {
		return name;
	}

	public int getAge() {
		return age;
	}

	public void run() {
		System.out.println(name + " is running.");
	}

	public void setName(String name2) {
		this.name = name2;
	}
	
	public String sayHello(String owner) throws Exception {
		if (name == null) {
			return null;
		}
		if (owner.length() > 5) {
			throw new Exception("Error.");
		}
		return "Hello, " + owner + ". I am " + name + ".";
	}
}